package org.edu.common.base;



/**
 * enum-操作符
 *

 * @version 1.0
 * @since 2020/4/2
 */
public enum OperationEnum implements BaseEnum<String> {
    /**
     * 等于
     */
    EQ("eq", "等于"),
    /**
     * 不等于
     */
    NE("ne", "不等于"),
    /**
     * 大于
     */
    GT("gt", "大于"),
    /**
     * 大于等于
     */
    GE("ge", "大于等于"),
    /**
     * 小于
     */
    LT("lt", "小于"),
    /**
     * 小于等于
     */
    LE("le", "小于等于"),
    /**
     * 小于
     */
    LT_DATE("lt_date", "小于"),
    /**
     * 大于
     */
    GT_DATE("gt_date", "大于"),
    /**
     * BETWEEN 值1 AND 值2
     */
    BETWEEN("between", "BETWEEN 值1 AND 值2"),
    /**
     * BETWEEN 值1 AND 值2
     */
    BETWEEN_DATE("between_date", "BETWEEN 值1 AND 值2"),
    /**
     * NOT BETWEEN 值1 AND 值2
     */
    NOT_BETWEEN("notBetween", "NOT BETWEEN 值1 AND 值2"),
    /**
     * LIKE '%值%'
     */
    LIKE("like", "LIKE '%值%'"),
    /**
     * NOT LIKE '%值%'
     */
    NOT_LIKE("notLike", "NOT LIKE '%值%'"),
    /**
     * LIKE '%值'
     */
    LIKE_LEFT("likeLeft", "LIKE '%值'"),
    /**
     * LIKE '值%'
     */
    LIKE_RIGHT("likeRight", "LIKE '值%'"),
    /**
     * 字段 IS NULL
     */
    IS_NULL("isNull", "字段 IS NULL"),
    /**
     * 字段 IS NOT NULL
     */
    IS_NOT_NULL("isNotNull", "字段 IS NOT NULL"),
    /**
     * 字段 in (1,2,3...)
     */
    IN("in", "字段 in (1,2,3...)"),
    /**
     * 字段 not in (1,2,3...)
     */
    NOT_IN("notIn", "字段 not in (1,2,3...)"),
    /**
     * and ()
     */
    AND("and", "and ()"),
    /**
     * or ()
     */
    OR("or", "or ()");

    /**
     * 值
     */
    private final String value;

    /**
     * 显示值
     */
    private final String displayName;

    OperationEnum(String value, String displayName) {
        this.value = value;
        this.displayName = displayName;
    }

    @Override
    public String getValue() {
        return value;
    }

    @Override
    public String getDisplayName() {
        return displayName;
    }
}
